﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;
using MoneyManagerNET.Presentation.ViewModel;

namespace MoneyManagerNET.Presentation.View
{
    
    /// <summary>
    /// Interaction logic for CategoriesWindow.xaml
    /// </summary>
    public partial class CategoryListView : Window, IView<CategoryListViewModel>, IScreen
    {
        public CategoryListView()
        {
            InitializeComponent();
        }

        private void Clicked_Select(object sender, RoutedEventArgs e)
        {
            DialogResult = true;
            Close();
        }


        private void btnAdd_Click(object sender, RoutedEventArgs e)
        {
            var vm = DataContext as Presentation.ViewModel.CategoryListViewModel;
            
        }

        private void tree_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            DialogResult = true;
            Close();
        }

        private void tree_SelectedItemChanged(object sender, RoutedPropertyChangedEventArgs<object> e)
        {
            
            var vm = this.ViewModel();
            vm.SelectedValue = e.NewValue;
        }


    }
}
